perm filename POXON.PUB[D,LES] blob
sn#138855 filedate 1975-01-02 generic text, type C, neo UTF8
COMMENT ⊗ VALID 00003 PAGES
C REC PAGE DESCRIPTION
C00001 00001
C00002 00002 .<< POX Simulation in PUB by Les Earnest, 1 Jan. 1975
C00006 00003 .device XGP
C00009 ENDMK
C⊗;
.<< POX Simulation in PUB by Les Earnest, 1 Jan. 1975
.
.The declarations below permit simple POX files to be run under PUB,
.so that you can add features not available in POX (e.g. page numbering,
.fancy headings or footings, or multiple columns). If you have any trouble
.with this scheme, let me know.
.
.This system handles most justification commands ("\C", "\R", "\J", and
."\.", but not "\;" or "\,") and font commands ("\M" and "\F", but not
."\f"), but no Q-register or macro commands. It handles file insertion
.("\α"), but not escape character change or quote("\|" or "\\").
.
.If you used "\" as the escape character, then just put
.REQUIRE "POXON.PUB[SUB,SYS]" SOURCE;
.as the first line of your file. Note that all Pub command lines start
.with ".". To Pub it, use the command "PUB <file>/PUB".
.Alternatively, if you want to keep the POX file "pure", create another
.file containing the above REQUIRE statement followed by
.REQUIRE "<pox file>" SOURCE;
.and Pub it.
.
.If you are using some other escape character, then take a copy of this file
.and replace "\" everywhere with your escape character. (SOS will do it
.in a single command; for example to change to "⊗", say "S\$⊗$/1:/99",
.where "$" denotes <altmode>).
.
.When justifying, this system breaks on either a blank line
.or a TAB in column 1, but always inserts a blank line between paragraphs
.and does not indent at the beginning of paragraphs. If you wish to
.indent paragraphs and leave no blank lines, then enter the Pub commands
.INDENT 4; PREFACE 0;
.
.If you want to add page numbers at the bottom of each page, call the macro
.BOTTOM
.just after this file. If you want to add a heading at the top
.left of each page and the page number at top right, then say
.TOP("<heading>");
.If you want a two column format with heading and page numbers, then say
.TWOCOL("<heading>");
.For fancier stuff, plunge on into PUB.
.>>
.device XGP;
.page frame 53 high 83 wide
.area text lines 1 to 52
.portion main; place text;
.ODDLEFTBORDER←EVENLEFTBORDER←1000;
.turn on "α{"; turn on "∀" for "%";
.
.at "\C"; ⊂ once center; ⊃;
.at "\R"; ⊂ once flush right; ⊃;
.at "\J"; ⊂ fill; adjust; compact; ⊃;
.at "\."; ⊂ nofill; ⊃;
.at "\@" filename ";"; ⊂ require "filename" source; ⊃;
.at "\"; ⊂ nofill ⊃;
.at pagemark ⊂ skip to column 1;⊃;
.at 8 ⊂ if filling then break else " "⊃;
.
.<< This part handles "\M" and "\F" commands. The strings
."poxfont" and "pubfont" handle the mapping of fonts, so you
.can switch them around if you wish by altering the "pubfont" string.
.>>
.macro defs(εmsg,εfontno,εfsg); ⊂
.at "msg" fontfile ";"; ⊂ font fontno "fontfile"; ⊃;
.at "fsg"; ⊂("∀"&"fontno")⊃;
.⊃;
.dig←1; poxfont←"0123456789ABCDEF"; pubfont←"G123456789ABCDEF";
.while(|dig≤16|,|msig←"\M"&poxfont[dig]; fno←pubfont[dig];
. fsig←"\F"&poxfont[dig]; defs(msig,fno,fsig); dig←dig+1;|);
.
.<< The rest of this has nothing to do with POX, but adds other features>>
.macro bottom; ⊂ area text lines 1 to 51;
.title area footing lines 52 to 53;
.every footing(,∀1{page!},);
.portion good; place text;
.⊃
.macro top(head); ⊂
.before page ⊂ once nofill; turn on "→"; select 1;
head→{page!}
. ⊃
.⊃
.twocol(head); ⊂
.area text lines 4 to 53 IN 2 COLUMNS 5 APART
.title area heading lines 1 to 3
.every heading("∀1head",,{page!});
.portion twoc; place text;
.⊃